package com.ocl.www.service;

import com.ocl.www.domain.UserFans;
import com.ocl.www.mapper.UserFansMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserFansService {

    @Autowired
    private UserFansMapper userFansMapper;

    public int setfollow(UserFans userFans) throws  Exception{

        int c = 0;
        c = userFansMapper.setfollow(userFans);
        return c;
    }
    public List<UserFans> getFollows(UserFans userFans)  throws  Exception{

        List<UserFans> fanslist = userFansMapper.getFollows(userFans);

        return fanslist;
    }

    public List<UserFans> getFans(UserFans userFans)  throws  Exception{

        List<UserFans> fanslist = userFansMapper.getFans(userFans);

        return fanslist;
    }


    public List<UserFans> selectUserFans(UserFans userFans) throws  Exception {
        return userFansMapper.selectUserFans(userFans);
    }

    public List<UserFans> selectFansWithIsread(UserFans userFans)  throws  Exception {
        return userFansMapper.selectFansWithIsread(userFans);
    }

    public int updateUserFansOfIsread(UserFans userFans) throws Exception{
        return userFansMapper.updateUserFansOfIsread(userFans);
    }
}
